Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[helm] Si bytes calculation always floor fix #10044

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

edwintye
Copy link
Contributor

@edwintye edwintye commented Nov 28, 2024

What this PR does

Changes the computation of mimir.siToBytes to use floating point arithmetics.

Additionally, adding a multiplication factor of 0.9 to the store gateway GOMEMLIMIT calculation. In the issue, it was suggested the multiplication factor to be 0.8 but after some testing and looking at other projects (such as prometheus) I settled on 0.9. Looking at the examples, it is common that the memory request and limit will be different so being a more generous number 0.9 is probably fine - some would argue a straight translation is probably fine as well which is the case in the jsonnet version. I am not too sure how exactly the jsonnet version works but from what I can tell this change does create a drift on the GOMEMLIMIT calculation between helm and jsonnet.

The tests in ci - compare-helm-with-jsonnet/compare-manifests to be exact - is failing but I can't get it to work and looking at the other PRs it looks like they have been failing for a while.

Which issue(s) this PR fixes or relates to

Fixes #9780

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

@edwintye edwintye marked this pull request as ready for review November 29, 2024 11:51
@edwintye edwintye requested a review from a team as a code owner November 29, 2024 11:51
Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for contributing the fix! The two changes in this PR looks orthogonal to each other: fixing siToBytes and changing the store-gateway GOMEMLIMIT. Can you open a PR for each (perhaps repurpose this PR and open a new one)?

I'm not sure about the 0.9 multiplication of the memory request for GOMEMLIMIT. At the every least we need some comparisons running this side-by-side with the old version for example to prove the need for it.

@@ -41,6 +41,7 @@ Entries should include a reference to the Pull Request that introduced the chang
* [BUGFIX] Fix how `fullnameOverride` is reflected in generated manifests. #9564
* [BUGFIX] Fix `extraObjects` linting with helm lint by padding with an extra new line. #9863
* [BUGFIX] Alertmanager: Set -server.http-idle-timeout to avoid EOF errors in ruler, also for zone aware Alertmanager #9851
* [BUGFIX] Fix calculation of `mimir.siToBytes` and use floating point arithmetics, also multiply the memory request by 0.9 for store-gateway `GOMEMLIMIT` #10044
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* [BUGFIX] Fix calculation of `mimir.siToBytes` and use floating point arithmetics, also multiply the memory request by 0.9 for store-gateway `GOMEMLIMIT` #10044
* [BUGFIX] Fix calculation of `mimir.siToBytes` and use floating point arithmetics. Also, multiply the memory request by 0.9 for store-gateway `GOMEMLIMIT` #10044

@armandgrillet
Copy link
Contributor

@edwintye Thank you for your contribution! Please update the PR following the feedback given in the comments.

@edwintye
Copy link
Contributor Author

Thanks Dimitar for the suggestion. I didn't realize that the jsonnet variant didn't have a multiplication factor for GOMEMLIMIT and only realize while creating the PR. I have now removed that commit and updated the changelog.

@chencs
Copy link
Contributor

chencs commented Dec 20, 2024

The CHANGELOG has just been cut to prepare for the next release. Please rebase main and eventually move the CHANGELOG entry added / updated in this PR to the top of the operations/helm/charts/mimir-distributed/CHANGELOG.md document. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[helm] Usage of function mimir.siToBytes seems inconsistent
5 participants